_base_ = [
    '../configs/atss/atss_r50_fpn_1x_coco.py'
]

model = dict(
    bbox_head=dict(
        num_classes=5,
        anchor_generator=dict(octave_base_scale=4),
    ))
# data
dataset_type = 'CocoDataset'
classes = ('1', '2', '3', '4', '5')
data_root = '/media/Store2/hlp/datasets/mmw'
img_norm_cfg = dict(
    mean=[18.87, 18.87, 18.87], std=[43.018, 43.018, 43.018], to_rgb=True)
train_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(type='LoadAnnotations', with_bbox=True),
    dict(type='Resize', img_scale=(400, 160), keep_ratio=True),
    dict(type='RandomFlip', flip_ratio=0.5),
    dict(type='Normalize', **img_norm_cfg),
    dict(type='Pad', size_divisor=32),
    dict(type='DefaultFormatBundle'),
    dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
]
test_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(
        type='MultiScaleFlipAug',
        img_scale=(400, 160),
        flip=False,
        transforms=[
            dict(type='Resize', keep_ratio=True),
            dict(type='RandomFlip'),
            dict(type='Normalize', **img_norm_cfg),
            dict(type='Pad', size_divisor=32),
            dict(type='ImageToTensor', keys=['img']),
            dict(type='Collect', keys=['img']),
        ])
]
data = dict(
    samples_per_gpu=88,
    workers_per_gpu=2,
    train=dict(
        type=dataset_type,
        classes=classes,
        data_root=data_root,
        ann_file='annotations/train.json',
        img_prefix='images/',
        pipeline=train_pipeline),
    val=dict(
        type=dataset_type,
        classes=classes,
        data_root=data_root,
        ann_file='annotations/val.json',
        img_prefix='images/',
        pipeline=test_pipeline),
    test=dict(
        type=dataset_type,
        classes=classes,
        data_root=data_root,
        ann_file='annotations/test.json',
        img_prefix='images/',
        pipeline=test_pipeline))
optimizer = dict(type='SGD', lr=0.03, momentum=0.9, weight_decay=0.0001)